package com.lzw.mapper;


import com.lzw.bean.bill;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wim泽
 * @since 2021-12-09
 */
public interface SmbmsBillMapper {

    @Select("select b.*,p.proName as providerName from smbms_bill b, smbms_provider p where b.providerId = p.id")
    List<bill> getBillList();

    @Select("select b.*,p.proName as providerName from smbms_bill b, smbms_provider p where b.providerId = p.id and b.id=#{id}")
    bill getBillById(@Param("id") String billid);

    @Delete("delete from smbms_bill where id=#{billid}")
    int delBillById(@Param("billid")String billid);
}
